package com.oocl.pmsystem.db;

import com.oocl.pmsystem.bean.Person;
import com.oocl.pmsystem.factory.DataFactory;

////工厂实现类
public class PersonListFactory extends DataFactory<SuperLinkedList<Person>>{

	private static PersonListFactory sInstance = null;
	
	private PersonListFactory() {
		
	}
	///单例模式
	public static PersonListFactory getInstance() {
		if(sInstance==null) {
			synchronized (PersonListFactory.class) {
				if(sInstance == null) {
					sInstance = new PersonListFactory();
				}
			}
		}
		return sInstance;
	}
	
	
	
	@Override
	public SuperLinkedList<Person> createData() {
		SuperLinkedList<Person> list = new SuperLinkedList<>();
		list.add(new Person("F", "female", "1999.12.30", "东岸村一号", null));
		list.add(new Person("G", "female", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("H", "female", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("I", "female", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("J", "female", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("A", "male", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("B", "male", "1999.12.30", null, "18811112222"));
		list.add(new Person("C", "male", "1999.12.30", "东岸村一号", "18811112222"));
		list.add(new Person("D", "male", null, "东岸村一号", "18811112222"));
		list.add(new Person("E", "female", "1999.12.30", "东岸村一号", "18811112222"));
		
		return list;
	}

}
